MAYBE_DISABLE_VERIFY=
endif
+ifdef CFG_ENABLE_OPTIMIZE
+OPT_FLAG=--release
+else
+OPT_FLAG=
+endif
+
export CFG_VERSION
ifeq ($(OS),Windows_NT)
define CARGO_TARGET
cargo-$(1): $$(CARGO)
- $$(CARGO) build --target $(1) $$(ARGS)
+ $$(CARGO) build --target $(1) $$(OPT_FLAG) $$(ARGS)
endef
$(foreach target,$(CFG_TARGET),$(eval $(call CARGO_TARGET,$(target))))
VAL_OPTIONS=""
opt debug 1 "build with extra debug fun"
+opt optimize 0 "build with optimizations"
opt nightly 0 "build nightly packages"
opt verify-install 1 "verify installed binaries work"
valopt prefix "/usr/local" "set installation prefix"